import style from "./index.module.scss";
import Image from "@/app/components/Image";

function Index({ list }) {
  return (
    <ul className={style.list}>
      {list.map((item) => {
        return (
          <li key={item.id}>
            <a href={`/cv/detail/${item.id}`} className={style.listItem}>
              <div className={style.content}>
                <h5 className={style.title}>{item.title}</h5>
                <div className={style.desc}>{item.description}</div>
              </div>

              <div className={style.img}>
                <Image src={item.img} alt={item.title} />
              </div>
            </a>
          </li>
        );
      })}
    </ul>
  );
}

export default Index;
